Skip to content

Conversation

@pyeonh8
Copy link
Collaborator

@pyeonh8 pyeonh8 commented Apr 4, 2025

요구사항

기본

  • 랜딩 페이지의 url path는 루트('/')로 설정합니다.
  • title은 "판다마켓"로 설정합니다.
  • 화면의 너비가 1920px 이상이면 하늘색 배경색은 너비를 꽉 채우도록 채워지고, 내부 요소들의 위치는 고정되고, 여백만 커지도록 합니다.
  • 화면의 너비가 1920px 보다 작아질 때, "판다마켓" 로고의 왼쪽 여백 200px"로그인" 버튼의 오른쪽 여백 200px이 유지되고, 화면의 너비가 작아질수록 두 요소간 거리가 가까워지도록 설정합니다.
  • 클릭으로 기능이 동작해야 하는 경우, 사용자가 클릭할 수 있는 요소임을 알 수 있도록 CSS 속성 cursor: pointer 로 설정합니다.
  • "판다마켓" 클릭 시 루트 페이지('/')로 이동합니다.
  • '로그인'버튼 클릭 시 로그인 페이지('/login')로 이동합니다 (빈 페이지)
  • "구경하러가기"버튼 클릭 시('/items')로 이동합니다.(빈 페이지)
  • "Privacy Policy", "FAQ"는 클릭 시 각각 Privacy 페이지('/privacy'), FAQ 페이지('/faq')로 이동합니다.(모두 빈 페이지)
  • 페이스북, 트위터, 유튜브, 인스타그램 아이콘을 클릭 시 각각의 홈페이지로 새로운 창이 열리면서 이동합니다.

심화

  • 사용자의 브라우저가 크고 작아짐에 따라 페이지의 요소간 간격, 요소의 크기, font-size 등 모든 크기와 관련된 값이 크고 작아지도록 설정해 보세요.(설정값은 자유입니다)

주요 변경사항

  • 4번의 요구사항의 경우 브라우저가 작아질 경우 여백 변경됨

스크린샷 & 배포 사이트

image

멘토에게

  • 안녕하세요 멘토님. 4번의 요구사항에 대해 질문이 있습니다.
    브라우저의 넓이 크기가 작아질 경우 상단 로고와 로그인 버튼 여백이 너무 큰 거 같아서 브라우저 창의 크기가 작아지면 여백 값도 변경되게 CSS를 추가 했는데
    기본 요구사항을 어긴 걸까요? 맞는 걸까요?

@pyeonh8 pyeonh8 requested a review from addiescode-sj April 4, 2025 05:20
@pyeonh8 pyeonh8 added the 매운맛🔥 뒤는 없습니다. 그냥 필터 없이 말해주세요. 책임은 제가 집니다. label Apr 4, 2025
Copy link
Collaborator

@addiescode-sj addiescode-sj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨어요!
몇가지 개선점만 다듬어보면 멋진 결과물이 나오겠네요 :)

주요 리뷰 포인트

  • 폰트 최적화
  • 이미지 alt 속성 추가
  • 미디어 쿼리 사용 관련 제안
  • 네이밍 컨벤션, 네이밍 케이스

Comment on lines +12 to +16
<div class="logo">
<a href="/">
<img class="logo-img" src="images/img_logo.png" alt="img_logo">
<img class="logo-mobile" src="images/img_logo_m.png" alt="img_logo_m">
</a>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오호 모바일 반응형에서는 판다 로고를 없애고 보이게끔 해주셨군요? 디테일을 볼줄 아시네요 👍


<div class="item">
<h1>일상의 모든 물건을 거래해 보세요</h1>
<a class="btn btn_large btn-color1" href="/items">구경하러 가기</a>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

접근성을 고려해 <a href="/" aria-label="홈으로 이동"> 과 같이 aria-label 혹은 role을 추가해볼까요?

<h1>일상의 모든 물건을 거래해 보세요</h1>
<a class="btn btn_large btn-color1" href="/items">구경하러 가기</a>
</div>
<img src="images/Img_home_top.png" alt="Img_home_top">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

귀찮더라도 항상 img태그에는 이미지를 최대한 구체적으로 잘 설명해주는 alt 속성을 추가해주세요.
웹 접근성뿐만 아니라, 이미지 로딩 실패 시 대체 텍스트를 표시하거나 검색엔진최적화에도 도움을 줄 수 있기 때문에 꼭 사용해주시는게 좋습니다.

레퍼런스로 애플 공식 웹사이트에 가서 alt텍스트를 어떻게 사용했는지 참고해보시면:

<img src="/kr/macbook-air/images/overview/design/design_hero_static__e56c1v71mr6u_large.jpg" onload="__lp(event)" alt="열려있는 MacBook Air 13 및 15의 모습. 한 대에는 디자인 작업을 진행 중인 화면이, 다른 한 대에는 이메일과 스프레드시트를 넘나들며 멀티태스킹을 하는 화면이 표시되어 있습니다">

이런식으로 alt 속성에 이미지 설명을 위해 구체적이고 명확한 설명을 제공하는 모습을 확인해보실 수 있습니다 :)

</section>
<section class="content-section">
<div class="content-box">
<img src="images/Img_home_03.png" alt="">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기엔 alt 속성이 빠져있네요!

Comment on lines +76 to +79
<a href="/facebook" target="_blank"><img src="images/ic_facebook.png" alt="facebook"></a>
<a href="/twitter" target="_blank"><img src="images/ic_twitter.png" alt="twitter"></a>
<a href="/youtube" target="_blank"><img src="images/ic_youtube.png" alt="youtube"></a>
<a href="/instagram" target="_blank"><img src="images/ic_instagram.png" alt="instagram"></a>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

외부 링크의 경우, 보안을 위해 rel="noopener noreferrer"를 추가해주세요! :)

noopener: 새 탭에서 열린 페이지가 원본 페이지에 접근하는 것을 방지
noreferrer: 리퍼러 정보가 새 페이지로 전달되는 것을 방지

Comment on lines +74 to +76
.logo-mobile {
display: none;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

개인의 선택이긴 한데, 미디어쿼리를 스타일 블록마다 작성해주는 방식이 있고 지금처럼 한꺼번에 아래에서 작성해주는 방식이 있는데, 저는 전자를 선호하긴합니다 ㅎㅎ 이런 방식도 있다는걸 참고해두시면 좋을것같아요 :)

Suggested change
.logo-mobile {
display: none;
}
.logo-mobile {
display: none;
@media (max-width: 375px) {
display: block;
}
}

Comment on lines +80 to +82
display: flex;
justify-content: center;
align-items: center;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이런 스타일 블록들도 여러 군데에서 반복되고있다면 따로 유틸용 클래스를 만들어서 재사용하시면 중복을 줄일 수 있겠죠?

e.g

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}


/* main > banner-section */
.banner-section {
background-color: #CFE5FF;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

자주 사용되는 값들은 css 변수로 만드시면 편하실거예요!

예시)

:root {
  /* Colors */
  --color-primary: #3692ff;
  --color-primary-dark: #1967d6;
  --color-text: #374151;
  --color-text-light: #9ca3af;
  --color-background: #ffffff;
  --color-background-alt: #fcfcfc;
  --color-background-landing: #cfe5ff;
  --color-background-footer: #111827;
  --color-text-light: #f3f4f6;
  --color-text-lighter: #f9fafb;

  /* Typography */
  --font-family-base: pretendard, sans-serif;
  --font-family-heading: "ROKAFSansMedium", sans-serif;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 64px;
  --spacing-xxl: 138px;

  /* Layout */
  --container-max-width: 1520px;
  --container-content-width: 1120px;
  --container-section-width: 988px;

  /* Border Radius */
  --border-radius-sm: 8px;
  --border-radius-lg: 40px;
}

gap: 20px;
padding-top: 32px;
}
footer .copyRight {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기서는 갑자기 카멜케이스를 쓰셨네요! 네이밍 케이스, 네이밍 컨벤션 잘 맞춰볼까요?

CSS 네이밍 컨벤션
자주 쓰는 네이밍케이스 정리

두개 참고해보시고, 일관적인 네이밍 규칙을 적용해보시면 좋을 것 같습니다!

}

/* 반응형 */
@media (max-width: 1950px) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요렇게 하시는것보다는 작은 화면에서부터 미디어 쿼리에 의한 재정의를 하는 구조로 바꿔보시는게 불필요한 스타일 오버라이드를 제거하는데 좀 더 유리합니다.

그리고 미디어 쿼리를 사용하실때 공통으로 사용되는 값들을 css 변수로 정의한다음 각 브레이크 포인트에서 변수값만 변경해주는식으로 활용하시면 스타일도 중복 제거하면서 유지보수에도 용이해집니다.

코멘트 참고해보시고 리팩토링해보세요! :)

@addiescode-sj
Copy link
Collaborator

질문에 대한 답변

멘토에게

  • 안녕하세요 멘토님. 4번의 요구사항에 대해 질문이 있습니다.
    브라우저의 넓이 크기가 작아질 경우 상단 로고와 로그인 버튼 여백이 너무 큰 거 같아서 브라우저 창의 크기가 작아지면 여백 값도 변경되게 CSS를 추가 했는데
    기본 요구사항을 어긴 걸까요? 맞는 걸까요?

심화 미션을 구현하셨군요! 기본 요구사항을 따르면 여백은 항상 양옆 200px을 유지하라고되어있지만, 모바일 등 스크린 사이즈가 작아질경우 여백값을 변경되게끔하는게 의도였다면 괜찮습니다!

@addiescode-sj addiescode-sj merged commit ec1966f into codeit-bootcamp-frontend:Basic-박연희 Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

매운맛🔥 뒤는 없습니다. 그냥 필터 없이 말해주세요. 책임은 제가 집니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants